public class Teacher extends Person//Teacher继承Person
{
    String subject;
    void teach()
    {
        System.out.println("我教授的是XXX");
    }
    public Teacher(String name,int age,String subject)
    {
        super(name, age);//实现父类构造方法传值
        super.eat();//重写void eat
    }
}